package com.heima.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.admin.mapper.AdNewsAuthMapper;
import com.heima.admin.service.AdNewsAuthService;
import com.heima.apis.wemedia.IWmNewsClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.wemedia.dtos.AdWmNewsDto;
import com.heima.model.wemedia.dtos.NewsAuthDto;
import com.heima.model.wemedia.pojos.WmNews;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class AdNewsAuthServiceImpl extends ServiceImpl<AdNewsAuthMapper, WmNews> implements AdNewsAuthService {

    @Autowired
    private IWmNewsClient wmNewsClient;
    /**
     * 对要进行人工审核的文章的列表查询
     *
     * @param dto
     * @return
     */
    @Override
    public ResponseResult list_vo(AdWmNewsDto dto) {

        log.info("service接受到的dto-----{}",dto);

        return wmNewsClient.list_vo(dto);
    }

    @Override
    public ResponseResult one_vo(int id) {
        return wmNewsClient.one_vo(id);
    }

    @Override
    public ResponseResult authFail(NewsAuthDto dto) {
        return wmNewsClient.authFail(dto);
    }

    @Override
    public ResponseResult authPass(NewsAuthDto dto) {
        return wmNewsClient.authPass(dto);
    }
}
